<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>发布 - 码匠社区</title>
    <title th:replace="head :: htmlHead"></title>
    <style>
        .main button {
            float: right;
        }
    </style>
</head>
<body>
<div th:insert="navigation :: headBar"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-sm-12">
            <h2 style="display: flex"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span><span>&emsp;编辑</span></h2>
            <hr>
            <form th:action="@{'/publish/' + ${question.id}}" method="post">
                <div class="form-group">
                    <label for="title">问题标题（简单扼要）：</label>
                    <input class="form-control" type="text" id="title" name="title" placeholder="问题标题..." th:value="${question.title}">
                </div>
                <div class="form-group" id="question-editor">
                    <label for="description">问题补充（必填，请参照右侧提示）：</label>
                    <div th:replace="markdown :: markdown"></div>
                    <textarea id="description" name="description" style="display:none;" th:text="${question.description}"></textarea>
                </div>
                <div class="form-group">
                    <label for="tag">添加标签：</label>
                    <input class="form-control" type="text" id="tag" name="tag" placeholder="输入标签，以','分割" th:value="${question.tag}">
                </div>
                <span th:if="${error != null}" th:text="${error}"></span>
                <button type="submit" class="btn btn-success">发布</button>
            </form>
        </div>
        <div class="col-lg-3 col-sm-12">
            <h3>问题发布规范</h3>
            <h5>➡第一</h5>
            <h5>➡第二</h5>
            <h5>➡第三</h5>
        </div>
    </div>
</div>
</body>
</html>